package com.zxjia.ssmp;

import com.alibaba.cloud.seata.feign.SeataFeignClientAutoConfiguration;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;

@SpringBootApplication(exclude = {SeataFeignClientAutoConfiguration.class})
@EnableFeignClients
@EnableDiscoveryClient
public class ApiApplication {

    /**
     *  SEATA 失效解决办法
     *   https://github.com/seata/seata/issues/3217
     */

    public static void main(String[] args) throws ParseException {
        SpringApplication.run(ApiApplication.class , args);
//
//        Date date = new Date();
//
//        String beginTime=new String("2021-06-24 00:00:00");
//
//        SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
//
//        Date sd1=df.parse(beginTime);
//
//        Calendar cal = Calendar.getInstance();
//        cal.setTime(sd1);//设置起时间
//        cal.add(Calendar.DATE, 1);//增加一天
//        cal.set(Calendar.HOUR_OF_DAY, 0);
//        cal.set(Calendar.MINUTE, 0);
//        cal.set(Calendar.SECOND, 0);
//        //Date1.before(Date2)，当Date1小于Date2时，返回TRUE，当大于等于时，返回false；
//
//        //Date1.after(Date2),当Date1大于Date2时，返回TRUE，当小于等于时，返回false； 特别注意：如果业务数据存在相等的时候，而且相等时也需要做相应的业务判断或处理时，请注意。
//        System.out.println(cal.getTime());
//        System.out.println(cal.getTime().before(new Date()));

    }



}
